import java.awt.Point;

public class MapDatabaseEntry {
	private String ImageName;
	
	private Point pointA, pointB;
	private Coord coordA, coordB;
	
	public Point pA() { return pointA; }
	public Coord cA() { return coordA; }
	public Point pB() { return pointB; }
	public Coord cB() { return coordB; }
	
	public String name() { return ImageName; }
	
	public double a() {
		double HRatio = (pointA.x - pointB.x)/(coordA.getLongitude() - coordB.getLongitude());
		double x = pointA.x + (180*HRatio);
		double a = x / Math.PI;
		return a;
	}
	
	public double h() {
		return (pointA.x - pointB.x)/(coordA.getLongitude() - coordB.getLongitude());
	}
	
	/*public double v() {
    	//calculate the y coordinates of the 2 given points
    	double s1 = Math.sin(coordA.getLatitude());
    	double l1 = ((Math.log((1 + s1)/(1 - s1)) / 2) / Math.PI);
    	double s2 = Math.sin(properties.controlCoord().getLatitude() * (Math.PI / 180));
    	double l2 = ((Math.log((1 + s2)/(1 - s2)) / 2) / Math.PI);
    	
    	//calculate the ratio of pixels to degrees for latitude
    	VRatio = (double)(properties.centerPoint().y - properties.controlPoint().y)/(l2 - l1);
	}*/
	
    public MapDatabaseEntry(String imgname, double aLat, double aLon, int aX, int aY, double bLat, double bLon, int bX, int bY) {
    	ImageName = imgname;
    	coordA = new Coord(aLat,aLon);
    	pointA = new Point(aX,aY);
    	coordB = new Coord(bLat,bLon);
    	pointB = new Point(bX,bY);
    }

    public String toString() {
    	return ImageName;
    }
}